//
//  RouteEntity.m
//  SXH
//
//  Created by 房 国生 on 15/7/23.
//  Copyright (c) 2015年 lyss. All rights reserved.
//

#import "RouteEntity.h"

@implementation RouteEntity

- (instancetype)initWithAttributes:(NSDictionary *)attributes {
    
    self = [super init];
    if (!self) {
        return nil;
    }
    
    self.t_id= [attributes valueForKeyPath:@"t_id"];
    self.t_name = [attributes valueForKeyPath:@"t_name"];
    self.t_preview = [attributes valueForKeyPath:@"t_preview"];
    self.t_departure_date = [attributes valueForKeyPath:@"t_departure_date"];
    self.album_thumb = [NSString stringWithFormat:@"%@/%@", IMAGE_URL, [attributes valueForKeyPath:@"album_thumb"]];
    self.t_vehicle = [attributes valueForKeyPath:@"t_vehicle"];
    self.t_service = [attributes valueForKeyPath:@"t_service"];
    self.t_image_url = [NSString stringWithFormat:@"%@/%@", IMAGE_URL, [attributes valueForKeyPath:@"t_image_url"]];
    self.t_insert_time = [attributes valueForKeyPath:@"t_insert_time"];
    self.t_update_time = [attributes valueForKeyPath:@"t_update_time"];
    self.t_old_price = [attributes valueForKeyPath:@"t_oldprice"];
    self.t_price = [attributes valueForKeyPath:@"t_price"];
    self.t_cityname = [attributes valueForKeyPath:@"t_cityname"];
    self.c_id = [attributes valueForKeyPath:@"c_id"];
    self.a_id = [attributes valueForKeyPath:@"a_id"];
    self.t_is_recommend = [attributes valueForKeyPath:@"t_is_recommend"];
    
    return self;
}

@end


